﻿@inherits AntComponent

<AntForm Id="@Id">
    <AntFormItem Label="用户名">
        <AntText Id="@nameof(LoginInfo.UserName)" Placeholder="请输入用户名" Required />
    </AntFormItem>
    <AntFormItem Label="密码">
        <AntPassword Id="@nameof(LoginInfo.Password)" Placeholder="请输入密码" Required />
    </AntFormItem>
    <AntFormItem>
        <div style="text-align:center;">
            <AntButton Name="登录" OnClick="@OnClick" />
        </div>
    </AntFormItem>
</AntForm>

@code {
    private string OnClick => $"return AntBlazor.validate('{Id}');";
}